{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Tutorial on Parameter defaults\n",
    "\n",
    "As of version `0.9.8`, `HDDM` doesn't expect that you always explicitly want to fit the `v`, `a` and `t` parameters. You are now allowed to fix any of these parameters to any default you like. In this tutorial we show how to fit any given subset of parameters of a model, while supplying (user picked) default values for the remaining parameters."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Install (colab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# package to help train networks\n",
    "# !pip install git+https://github.com/AlexanderFengler/LANfactory\n",
    "\n",
    "# package containing simulators for ssms\n",
    "# !pip install git+https://github.com/AlexanderFengler/ssm_simulators\n",
    "\n",
    "# packages related to hddm\n",
    "# !pip install cython\n",
    "# !pip install pymc==2.3.8\n",
    "# !pip install git+https://github.com/hddm-devs/kabuki\n",
    "# !pip install git+https://github.com/hddm-devs/hddm"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Load Modules"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# MODULE IMPORTS ----\n",
    "\n",
    "# warning settings\n",
    "import warnings\n",
    "\n",
    "warnings.simplefilter(action=\"ignore\", category=FutureWarning)\n",
    "\n",
    "# Data management\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import pickle\n",
    "\n",
    "# Plotting\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib\n",
    "import seaborn as sns\n",
    "\n",
    "# Stats functionality\n",
    "from statsmodels.distributions.empirical_distribution import ECDF\n",
    "\n",
    "# HDDM\n",
    "import hddm\n",
    "from hddm.simulators.hddm_dataset_generators import simulator_h_c"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example Models"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### `HDDM()`\n",
    "#### Simulate Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "# from hddm.simulators.hddm_dataset_generators import simulator_h_c\n",
    "from hddm.simulators.basic_simulator import simulator\n",
    "from hddm.simulators.hddm_dataset_generators import hddm_preprocess\n",
    "\n",
    "model = \"ddm_hddm_base\"\n",
    "\n",
    "data = simulator(theta=[1.0, 1.0, 0.5, 0.5], model=model, n_samples=500)\n",
    "\n",
    "data = hddm_preprocess(data)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Model and  Sample\n",
    "\n",
    "Let's first fit all parameters."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "No model attribute --> setting up standard HDDM\n",
      "Set model to ddm\n"
     ]
    }
   ],
   "source": [
    "hddm_model = hddm.HDDM(\n",
    "    data,\n",
    "    include=[\"v\", \"a\", \"t\", \"z\"],\n",
    "    informative=False,\n",
    "    is_group_model=False,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " [-----------------100%-----------------] 1000 of 1000 complete in 8.5 sec"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<pymc.MCMC.MCMC at 0x7ff3014fc210>"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hddm_model.sample(1000, burn=500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>2.5q</th>\n",
       "      <th>25q</th>\n",
       "      <th>50q</th>\n",
       "      <th>75q</th>\n",
       "      <th>97.5q</th>\n",
       "      <th>mc err</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>0.996413</td>\n",
       "      <td>0.022212</td>\n",
       "      <td>0.949557</td>\n",
       "      <td>0.983287</td>\n",
       "      <td>0.995682</td>\n",
       "      <td>1.011092</td>\n",
       "      <td>1.040408</td>\n",
       "      <td>0.001349</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>v</th>\n",
       "      <td>1.150145</td>\n",
       "      <td>0.122256</td>\n",
       "      <td>0.925338</td>\n",
       "      <td>1.072607</td>\n",
       "      <td>1.14161</td>\n",
       "      <td>1.225006</td>\n",
       "      <td>1.435445</td>\n",
       "      <td>0.007297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>t</th>\n",
       "      <td>0.501954</td>\n",
       "      <td>0.003282</td>\n",
       "      <td>0.495503</td>\n",
       "      <td>0.500019</td>\n",
       "      <td>0.502353</td>\n",
       "      <td>0.504147</td>\n",
       "      <td>0.507753</td>\n",
       "      <td>0.000225</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>z</th>\n",
       "      <td>0.488272</td>\n",
       "      <td>0.015967</td>\n",
       "      <td>0.45511</td>\n",
       "      <td>0.477788</td>\n",
       "      <td>0.489069</td>\n",
       "      <td>0.498717</td>\n",
       "      <td>0.519293</td>\n",
       "      <td>0.001011</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       mean       std      2.5q       25q       50q       75q     97.5q  \\\n",
       "a  0.996413  0.022212  0.949557  0.983287  0.995682  1.011092  1.040408   \n",
       "v  1.150145  0.122256  0.925338  1.072607   1.14161  1.225006  1.435445   \n",
       "t  0.501954  0.003282  0.495503  0.500019  0.502353  0.504147  0.507753   \n",
       "z  0.488272  0.015967   0.45511  0.477788  0.489069  0.498717  0.519293   \n",
       "\n",
       "     mc err  \n",
       "a  0.001349  \n",
       "v  0.007297  \n",
       "t  0.000225  \n",
       "z  0.001011  "
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hddm_model.gen_stats()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now we **fix `a` to it's default** as per the `HDDM`-supplied `model_config` dictionary. As shown below,\n",
    "this sets `a = 2.` which corresponds to an overestimation. We expect that, having fixed `a` at such value, we will correspondingly overestimate `v` to compensate (however the fit will end up worse in general)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'doc': 'Model used internally for simulation purposes. Do NOT use with the LAN extension.',\n",
       " 'params': ['v', 'a', 'z', 't'],\n",
       " 'params_trans': [0, 0, 1, 0],\n",
       " 'params_std_upper': [1.5, 1.0, None, 1.0],\n",
       " 'param_bounds': [[-5.0, 0.1, 0.05, 0], [5.0, 5.0, 0.95, 3.0]],\n",
       " 'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       " 'params_default': [0.0, 2.0, 0.5, 0],\n",
       " 'hddm_include': ['v', 'a', 't', 'z'],\n",
       " 'choices': [0, 1],\n",
       " 'slice_widths': {'v': 1.5,\n",
       "  'v_std': 1,\n",
       "  'a': 1,\n",
       "  'a_std': 1,\n",
       "  'z': 0.1,\n",
       "  'z_trans': 0.2,\n",
       "  't': 0.01,\n",
       "  't_std': 0.15}}"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hddm.model_config.model_config[\"ddm_hddm_base\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "No model attribute --> setting up standard HDDM\n",
      "Set model to ddm\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/afengler/OneDrive/project_hddm_extension/hddm/hddm/models/base.py:1316: UserWarning:  \n",
      " Your include statement misses either the v, a or t parameters. \n",
      "Parameters not explicitly included will be set to the defaults, \n",
      "which you can find in the model_config dictionary!\n",
      "  \"Parameters not explicitly included will be set to the defaults, \\n\" + \\\n"
     ]
    }
   ],
   "source": [
    "hddm_model_no_a = hddm.HDDM(\n",
    "    data,\n",
    "    include=[\"v\", \"t\", \"z\"],\n",
    "    informative=False,\n",
    "    is_group_model=False,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " [-----------------100%-----------------] 1000 of 1000 complete in 5.6 sec"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<pymc.MCMC.MCMC at 0x7ff301546b50>"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hddm_model_no_a.sample(1000, burn=500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>2.5q</th>\n",
       "      <th>25q</th>\n",
       "      <th>50q</th>\n",
       "      <th>75q</th>\n",
       "      <th>97.5q</th>\n",
       "      <th>mc err</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>v</th>\n",
       "      <td>2.077952</td>\n",
       "      <td>0.146506</td>\n",
       "      <td>1.806508</td>\n",
       "      <td>1.977741</td>\n",
       "      <td>2.075691</td>\n",
       "      <td>2.164686</td>\n",
       "      <td>2.385388</td>\n",
       "      <td>0.011489</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>t</th>\n",
       "      <td>0.335338</td>\n",
       "      <td>0.009595</td>\n",
       "      <td>0.315019</td>\n",
       "      <td>0.330216</td>\n",
       "      <td>0.335275</td>\n",
       "      <td>0.341575</td>\n",
       "      <td>0.353736</td>\n",
       "      <td>0.000553</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>z</th>\n",
       "      <td>0.36132</td>\n",
       "      <td>0.022235</td>\n",
       "      <td>0.319808</td>\n",
       "      <td>0.346506</td>\n",
       "      <td>0.360754</td>\n",
       "      <td>0.376082</td>\n",
       "      <td>0.406029</td>\n",
       "      <td>0.001815</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       mean       std      2.5q       25q       50q       75q     97.5q  \\\n",
       "v  2.077952  0.146506  1.806508  1.977741  2.075691  2.164686  2.385388   \n",
       "t  0.335338  0.009595  0.315019  0.330216  0.335275  0.341575  0.353736   \n",
       "z   0.36132  0.022235  0.319808  0.346506  0.360754  0.376082  0.406029   \n",
       "\n",
       "     mc err  \n",
       "v  0.011489  \n",
       "t  0.000553  \n",
       "z  0.001815  "
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hddm_model_no_a.gen_stats()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As predicted, `v` is now overestimated as well.\n",
    "\n",
    "Let's now try to set `a` to a default of our liking. We will set it to the ground-truth and again not include it in the parameters to estimate. To do so, we supply our own `model_config` to the `HDDM()` class."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Custom model config supplied as: \n",
      "\n",
      "{'doc': 'Model used internally for simulation purposes. Do NOT use with the LAN extension.', 'params': ['v', 'a', 'z', 't'], 'params_trans': [0, 0, 1, 0], 'params_std_upper': [1.5, 1.0, None, 1.0], 'param_bounds': [[-5.0, 0.1, 0.05, 0], [5.0, 5.0, 0.95, 3.0]], 'boundary': <function constant at 0x7ff31c1fab90>, 'params_default': [0.0, 1.0, 0.5, 0], 'hddm_include': ['v', 'a', 't', 'z'], 'choices': [0, 1], 'slice_widths': {'v': 1.5, 'v_std': 1, 'a': 1, 'a_std': 1, 'z': 0.1, 'z_trans': 0.2, 't': 0.01, 't_std': 0.15}}\n",
      "No model attribute --> setting up standard HDDM\n",
      "Set model to ddm\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/afengler/OneDrive/project_hddm_extension/hddm/hddm/models/base.py:1316: UserWarning:  \n",
      " Your include statement misses either the v, a or t parameters. \n",
      "Parameters not explicitly included will be set to the defaults, \n",
      "which you can find in the model_config dictionary!\n",
      "  \"Parameters not explicitly included will be set to the defaults, \\n\" + \\\n"
     ]
    }
   ],
   "source": [
    "from copy import deepcopy\n",
    "\n",
    "# copy model_config dictionary so we can change it\n",
    "my_model_config = deepcopy(hddm.model_config.model_config[\"ddm_hddm_base\"])\n",
    "\n",
    "# setting 'a' to 1.\n",
    "my_model_config[\"params_default\"][1] = 1.0\n",
    "\n",
    "hddm_model_no_a_2 = hddm.HDDM(\n",
    "    data,\n",
    "    include=[\"v\", \"t\", \"z\"],\n",
    "    informative=False,\n",
    "    is_group_model=False,\n",
    "    model_config=my_model_config,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " [-----------------100%-----------------] 1000 of 1000 complete in 5.2 sec"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<pymc.MCMC.MCMC at 0x7ff30157b150>"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hddm_model_no_a_2.sample(1000, burn=500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>2.5q</th>\n",
       "      <th>25q</th>\n",
       "      <th>50q</th>\n",
       "      <th>75q</th>\n",
       "      <th>97.5q</th>\n",
       "      <th>mc err</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>v</th>\n",
       "      <td>1.171748</td>\n",
       "      <td>0.118515</td>\n",
       "      <td>0.935492</td>\n",
       "      <td>1.094611</td>\n",
       "      <td>1.170236</td>\n",
       "      <td>1.251087</td>\n",
       "      <td>1.425975</td>\n",
       "      <td>0.006572</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>t</th>\n",
       "      <td>0.501641</td>\n",
       "      <td>0.002593</td>\n",
       "      <td>0.496291</td>\n",
       "      <td>0.499915</td>\n",
       "      <td>0.50178</td>\n",
       "      <td>0.503453</td>\n",
       "      <td>0.506346</td>\n",
       "      <td>0.000121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>z</th>\n",
       "      <td>0.486188</td>\n",
       "      <td>0.016581</td>\n",
       "      <td>0.450828</td>\n",
       "      <td>0.476066</td>\n",
       "      <td>0.486156</td>\n",
       "      <td>0.497147</td>\n",
       "      <td>0.518931</td>\n",
       "      <td>0.000963</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       mean       std      2.5q       25q       50q       75q     97.5q  \\\n",
       "v  1.171748  0.118515  0.935492  1.094611  1.170236  1.251087  1.425975   \n",
       "t  0.501641  0.002593  0.496291  0.499915   0.50178  0.503453  0.506346   \n",
       "z  0.486188  0.016581  0.450828  0.476066  0.486156  0.497147  0.518931   \n",
       "\n",
       "     mc err  \n",
       "v  0.006572  \n",
       "t  0.000121  \n",
       "z  0.000963  "
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hddm_model_no_a_2.gen_stats()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As we see, in this case `v` is estimated appropriately again."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### Let's compare DICs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Standard:  -7.05123814817064\n",
      "No a with HDDM default:  562.273161208081\n",
      "No a with a set to ground truth:  -9.028954442474097\n"
     ]
    }
   ],
   "source": [
    "print(\"Standard: \", hddm_model.dic)\n",
    "print(\"No a with HDDM default: \", hddm_model_no_a.dic)\n",
    "print(\"No a with a set to ground truth: \", hddm_model_no_a_2.dic)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### HDDMnn()\n",
    "\n",
    "Let's repeat this with another model via the `HDDMnn()` class.\n",
    "We will pick the `HDDM`-supplied `angle` model."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Simulate Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = \"angle\"\n",
    "theta = [1.0, 1.5, 0.5, 0.5, 0.2]  # v, a, z, t, theta\n",
    "data_angle = simulator(theta=theta, model=\"angle\", n_samples=500)\n",
    "data_angle = hddm_preprocess(data_angle, keep_negative_responses=True)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Model and Sample"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Using default priors: Uninformative\n",
      "Supplied model_config specifies params_std_upper for  z as  None.\n",
      "Changed to 10\n"
     ]
    }
   ],
   "source": [
    "model_angle = hddm.HDDMnn(\n",
    "    data_angle, model=\"angle\", include=[\"v\", \"a\", \"t\", \"z\", \"theta\"]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " [-----------------100%-----------------] 1000 of 1000 complete in 52.0 sec"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<pymc.MCMC.MCMC at 0x7ff301575390>"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_angle.sample(1000, burn=500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>2.5q</th>\n",
       "      <th>25q</th>\n",
       "      <th>50q</th>\n",
       "      <th>75q</th>\n",
       "      <th>97.5q</th>\n",
       "      <th>mc err</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>v</th>\n",
       "      <td>1.020563</td>\n",
       "      <td>0.083431</td>\n",
       "      <td>0.852936</td>\n",
       "      <td>0.964464</td>\n",
       "      <td>1.020123</td>\n",
       "      <td>1.074769</td>\n",
       "      <td>1.178448</td>\n",
       "      <td>0.006605</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>1.584719</td>\n",
       "      <td>0.098083</td>\n",
       "      <td>1.419463</td>\n",
       "      <td>1.511524</td>\n",
       "      <td>1.576579</td>\n",
       "      <td>1.651892</td>\n",
       "      <td>1.787859</td>\n",
       "      <td>0.009077</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>z</th>\n",
       "      <td>0.526568</td>\n",
       "      <td>0.025441</td>\n",
       "      <td>0.475032</td>\n",
       "      <td>0.510146</td>\n",
       "      <td>0.527315</td>\n",
       "      <td>0.543314</td>\n",
       "      <td>0.577972</td>\n",
       "      <td>0.002245</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>t</th>\n",
       "      <td>0.494598</td>\n",
       "      <td>0.037365</td>\n",
       "      <td>0.420589</td>\n",
       "      <td>0.470531</td>\n",
       "      <td>0.495294</td>\n",
       "      <td>0.521575</td>\n",
       "      <td>0.561596</td>\n",
       "      <td>0.003361</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>theta</th>\n",
       "      <td>0.270865</td>\n",
       "      <td>0.050656</td>\n",
       "      <td>0.177934</td>\n",
       "      <td>0.236454</td>\n",
       "      <td>0.269616</td>\n",
       "      <td>0.304024</td>\n",
       "      <td>0.377811</td>\n",
       "      <td>0.004407</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           mean       std      2.5q       25q       50q       75q     97.5q  \\\n",
       "v      1.020563  0.083431  0.852936  0.964464  1.020123  1.074769  1.178448   \n",
       "a      1.584719  0.098083  1.419463  1.511524  1.576579  1.651892  1.787859   \n",
       "z      0.526568  0.025441  0.475032  0.510146  0.527315  0.543314  0.577972   \n",
       "t      0.494598  0.037365  0.420589  0.470531  0.495294  0.521575  0.561596   \n",
       "theta  0.270865  0.050656  0.177934  0.236454  0.269616  0.304024  0.377811   \n",
       "\n",
       "         mc err  \n",
       "v      0.006605  \n",
       "a      0.009077  \n",
       "z      0.002245  \n",
       "t      0.003361  \n",
       "theta  0.004407  "
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_angle.gen_stats()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Again we will now leave out one parameter (let's pick `theta` this time). As we can see from the printed `model_config` below, the default that will be chosen for this parameter is to set it to `0` in this case."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'ddm_hddm_base': {'doc': 'Model used internally for simulation purposes. Do NOT use with the LAN extension.',\n",
       "  'params': ['v', 'a', 'z', 't'],\n",
       "  'params_trans': [0, 0, 1, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0],\n",
       "  'param_bounds': [[-5.0, 0.1, 0.05, 0], [5.0, 5.0, 0.95, 3.0]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 2.0, 0.5, 0],\n",
       "  'hddm_include': ['v', 'a', 't', 'z'],\n",
       "  'choices': [0, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'full_ddm_hddm_base': {'doc': 'Model used internally for simulation purposes. Do NOT use with the LAN extension.',\n",
       "  'params': ['v', 'a', 'z', 't', 'sz', 'sv', 'st'],\n",
       "  'params_trans': [0, 0, 1, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 0.1, 0.5, 0.1],\n",
       "  'param_bounds': [[-5.0, 0.1, 0.3, 0.25, 0, 0, 0],\n",
       "   [5.0, 5.0, 0.7, 2.25, 0.25, 4.0, 0.25]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.25, 0, 0, 0],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'st', 'sv', 'sz'],\n",
       "  'choices': [0, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'sz': 1.1,\n",
       "   'st': 0.1,\n",
       "   'sv': 0.5}},\n",
       " 'ddm': {'doc': 'Basic DDM. Meant for use with the LAN extension. \\nNote that the boundaries here are coded as -a, and a in line with all other models meant for the LAN extension. \\nTo compare model fits between standard HDDM and HDDMnn when using the DDM model, multiply the boundary (a) parameter by 2. \\nWe recommend using standard HDDM if you are interested in the basic DDM, but you might want to use this for testing.',\n",
       "  'params': ['v', 'a', 'z', 't'],\n",
       "  'params_trans': [0, 0, 1, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0],\n",
       "  'param_bounds': [[-3.0, 0.3, 0.1, 0.001], [3.0, 2.5, 0.9, 2.0]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.001],\n",
       "  'hddm_include': ['v', 'a', 't', 'z'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'angle': {'doc': 'Model formulation is described in the documentation under LAN Extension.\\nMeant for use with the extension.',\n",
       "  'params': ['v', 'a', 'z', 't', 'theta'],\n",
       "  'params_trans': [0, 0, 1, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 1.0],\n",
       "  'param_bounds': [[-3.0, 0.3, 0.1, 0.001, -0.1], [3.0, 3.0, 0.9, 2.0, 1.3]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.001, 0.1],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'theta'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'weibull': {'doc': 'Model formulation is described in the documentation under LAN Extension.\\nMeant for use with the extension.',\n",
       "  'params': ['v', 'a', 'z', 't', 'alpha', 'beta'],\n",
       "  'params_trans': [0, 0, 1, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 2.0, 2.0],\n",
       "  'param_bounds': [[-2.5, 0.3, 0.2, 0.001, 0.31, 0.31],\n",
       "   [2.5, 2.5, 0.8, 2.0, 4.99, 6.99]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.weibull_cdf(t=1, alpha=1, beta=1)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.001, 3.0, 3.0],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'alpha', 'beta'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'alpha': 1.0,\n",
       "   'alpha_std': 0.5,\n",
       "   'beta': 1.0,\n",
       "   'beta_std': 0.5}},\n",
       " 'levy': {'doc': 'Model formulation is described in the documentation under LAN Extension.\\nMeant for use with the extension.',\n",
       "  'params': ['v', 'a', 'z', 'alpha', 't'],\n",
       "  'params_trans': [0, 0, 1, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 1.0],\n",
       "  'param_bounds': [[-3.0, 0.3, 0.1, 1.0, 0.001], [3.0, 2.0, 0.9, 2.0, 2]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 1.5, 0.001],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'alpha'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'alpha': 1.0,\n",
       "   'alpha_std': 0.5}},\n",
       " 'full_ddm': {'doc': 'Currently unavailable, for LANs after switch to pytorch. \\nComing soon... Please use standard HDDM if you want to fit this model to your data.',\n",
       "  'params': ['v', 'a', 'z', 't', 'sz', 'sv', 'st'],\n",
       "  'params_trans': [0, 0, 1, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 0.1, 0.5, 0.1],\n",
       "  'param_bounds': [[-3.0, 0.3, 0.3, 0.25, 0.001, 0.001, 0.001],\n",
       "   [3.0, 2.5, 0.7, 2.25, 0.2, 2.0, 0.25]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.25, 0.001, 0.001, 0.001],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'st', 'sv', 'sz'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'sz': 1.1,\n",
       "   'st': 0.1,\n",
       "   'sv': 0.5}},\n",
       " 'ornstein': {'doc': 'Model formulation is described in the documentation under LAN Extension.Meant for use with the extension.',\n",
       "  'params': ['v', 'a', 'z', 'g', 't'],\n",
       "  'params_trans': [0, 0, 1, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 1.0],\n",
       "  'param_bounds': [[-2.0, 0.3, 0.2, -1.0, 0.001], [2.0, 2.0, 0.8, 1.0, 2]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.0, 0.001],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'g'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 0.1,\n",
       "   'a': 1,\n",
       "   'a_std': 0.1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'g': 0.1,\n",
       "   'g_trans': 0.2,\n",
       "   'g_std': 0.1}},\n",
       " 'ddm_sdv': {'doc': 'Currently unavailable, for LANs after switch to pytorch. Coming soon...Please use standard HDDM if you want to fit this model to your data.',\n",
       "  'params': ['v', 'a', 'z', 't', 'sv'],\n",
       "  'params_trans': [0, 0, 1, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 1.0],\n",
       "  'param_bounds': [[-3.0, 0.3, 0.1, 0.001, 0.001], [3.0, 2.5, 0.9, 2.0, 2.5]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.001, 0.001],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'sv'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'sv': 0.5}},\n",
       " 'gamma_drift': {'doc': 'Meant for use with the LAN extension',\n",
       "  'params': ['v', 'a', 'z', 't', 'shape', 'scale', 'c'],\n",
       "  'params_trans': [0, 0, 1, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 2.0, 2.0, 1.5],\n",
       "  'param_bounds': [[-3.0, 0.3, 0.1, 0.001, 2.0, 0.01, -3.0],\n",
       "   [3.0, 3.0, 0.9, 2.0, 10.0, 1.0, 3.0]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.25, 5.0, 0.5, 1.0],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'shape', 'scale', 'c'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'shape': 1,\n",
       "   'shape_std': 1,\n",
       "   'scale': 1,\n",
       "   'scale_std': 1,\n",
       "   'c': 1,\n",
       "   'c_std': 1}},\n",
       " 'gamma_drift_angle': {'doc': 'Meant for use with the LAN extension',\n",
       "  'params': ['v', 'a', 'z', 't', 'theta', 'shape', 'scale', 'c'],\n",
       "  'params_trans': [0, 0, 1, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 1.0, 2.0, 2.0, 1.5],\n",
       "  'param_bounds': [[-3.0, 0.3, 0.1, 0.001, -0.1, 2.0, 0.01, -3.0],\n",
       "   [3.0, 3.0, 0.9, 2.0, 1.3, 10.0, 1.0, 3.0]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.25, 0.0, 5.0, 0.5, 1.0],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'shape', 'scale', 'c', 'theta'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2,\n",
       "   'shape': 1,\n",
       "   'shape_std': 1,\n",
       "   'scale': 1,\n",
       "   'scale_std': 1,\n",
       "   'c': 1,\n",
       "   'c_std': 1}},\n",
       " 'ds_conflict_drift': {'doc': 'Meant for use with LAN extension.',\n",
       "  'params': ['a',\n",
       "   'z',\n",
       "   't',\n",
       "   'tinit',\n",
       "   'dinit',\n",
       "   'tslope',\n",
       "   'dslope',\n",
       "   'tfixedp',\n",
       "   'tcoh',\n",
       "   'dcoh'],\n",
       "  'param_bounds': [[0.3, 0.1, 0.001, 0, 0, 0.01, 0.01, 0, -1.0, -1.0],\n",
       "   [3.0, 0.9, 2.0, 5.0, 5.0, 5.0, 5.0, 5.0, 1.0, 1.0]],\n",
       "  'params_trans': [0, 1, 0, 0, 0, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.0, None, 1.0, 1.5, 1.5, 1.5, 1.5, 1.5, 1.0, 1.0],\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 0.5, 0.5, 0.5, 1.0],\n",
       "  'hddm_include': ['a',\n",
       "   'z',\n",
       "   't',\n",
       "   'tinit',\n",
       "   'dinit',\n",
       "   'tslope',\n",
       "   'dslope',\n",
       "   'tfixedp',\n",
       "   'tcoh',\n",
       "   'dcoh'],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widhts': {'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   'z_std': 1,\n",
       "   'z_trans_std': 1,\n",
       "   't': 0.01,\n",
       "   't_std': 1,\n",
       "   'tinit': 0.1,\n",
       "   'tinit_std': 1,\n",
       "   'dinit': 0.1,\n",
       "   'dinit_std': 1,\n",
       "   'tslope': 1,\n",
       "   'tslope_std': 1,\n",
       "   'dslope': 1,\n",
       "   'dslope_std': 1,\n",
       "   'tfixedp': 1,\n",
       "   'tfixedp_std': 1,\n",
       "   'tcoh': 1,\n",
       "   'tcoh_std': 1,\n",
       "   'dcoh': 1,\n",
       "   'dcohe_std': 1}},\n",
       " 'ds_conflict_drift_angle': {'doc': 'Meant for use with LAN extension.',\n",
       "  'params': ['a',\n",
       "   'z',\n",
       "   't',\n",
       "   'tinit',\n",
       "   'dinit',\n",
       "   'tslope',\n",
       "   'dslope',\n",
       "   'tfixedp',\n",
       "   'tcoh',\n",
       "   'dcoh',\n",
       "   'angle'],\n",
       "  'param_bounds': [[0.3, 0.1, 0.001, 0, 0, 0.01, 0.01, 0, -1.0, -1.0, -0.1],\n",
       "   [3.0, 0.9, 2.0, 5.0, 5.0, 5.0, 5.0, 5.0, 1.0, 1.0, 1.3]],\n",
       "  'params_trans': [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.0, None, 1.0, 1.5, 1.5, 1.5, 1.5, 1.5, 1.0, 1.0, 1.0],\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 0.5, 0.5, 0.5, 1.0, 0.0],\n",
       "  'hddm_include': ['a',\n",
       "   'z',\n",
       "   't',\n",
       "   'tinit',\n",
       "   'dinit',\n",
       "   'tslope',\n",
       "   'dslope',\n",
       "   'tfixedp',\n",
       "   'tcoh',\n",
       "   'dcoh',\n",
       "   'theta'],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widhts': {'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   'z_std': 1,\n",
       "   'z_trans_std': 1,\n",
       "   't': 0.01,\n",
       "   't_std': 1,\n",
       "   'tinit': 0.1,\n",
       "   'tinit_std': 1,\n",
       "   'dinit': 0.1,\n",
       "   'dinit_std': 1,\n",
       "   'tslope': 1,\n",
       "   'tslope_std': 1,\n",
       "   'dslope': 1,\n",
       "   'dslope_std': 1,\n",
       "   'tfixedp': 1,\n",
       "   'tfixedp_std': 1,\n",
       "   'tcoh': 1,\n",
       "   'tcoh_std': 1,\n",
       "   'dcoh': 1,\n",
       "   'dcoh_std': 1,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'ddm_par2': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 'zh', 'zl1', 'zl2', 't'],\n",
       "  'params_trans': [0, 0, 0, 0, 1, 1, 1, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, None, None, None, 1.0],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.2, 0.2, 0.2, 0.0],\n",
       "   [2.5, 2.5, 2.5, 2.0, 0.8, 0.8, 0.8, 2.0]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 0.5, 0.5, 0.5, 1.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 'zh', 'zl1', 'zl2', 't'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'zh': 0.1,\n",
       "   'zh_trans': 0.2,\n",
       "   'zl1': 0.1,\n",
       "   'zl1_trans': 0.2,\n",
       "   'zl2': 0.1,\n",
       "   'zl2_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'ddm_par2_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 't'],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.0], [2.5, 2.5, 2.5, 2.0, 2.0]],\n",
       "  'params_trans': [0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 1.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 't'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'ddm_par2_angle_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 't', 'theta'],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.0, -0.1],\n",
       "   [2.5, 2.5, 2.5, 2.0, 2.0, 1.0]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'boundary_multiplicative': False,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 1.0, 0.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 't', 'theta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'ddm_par2_weibull_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 't', 'alpha', 'beta'],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.0, 0.31, 0.31],\n",
       "   [2.5, 2.5, 2.5, 2.0, 2.0, 4.99, 6.99]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.5, 1.5],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.weibull_cdf(t=1, alpha=1, beta=1)>,\n",
       "  'boundary_multiplicative': True,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 1.0, 2.5, 3.5],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 't', 'alpha', 'beta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2,\n",
       "   'alpha': 1.0,\n",
       "   'alpha_std': 0.5,\n",
       "   'beta': 1.0,\n",
       "   'beta_std': 0.5}},\n",
       " 'ddm_seq2': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 'zh', 'zl1', 'zl2', 't'],\n",
       "  'params_trans': [0, 0, 0, 0, 1, 1, 1, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, None, None, None, 1.0],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.2, 0.2, 0.2, 0.0],\n",
       "   [2.5, 2.5, 2.5, 2.0, 0.8, 0.8, 0.8, 2.0]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 0.5, 0.5, 0.5, 1.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 'zh', 'zl1', 'zl2', 't'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'zh': 0.1,\n",
       "   'zh_trans': 0.2,\n",
       "   'zl1': 0.1,\n",
       "   'zl1_trans': 0.2,\n",
       "   'zl2': 0.1,\n",
       "   'zl2_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'ddm_seq2_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 't'],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.0], [2.5, 2.5, 2.5, 2.0, 2.0]],\n",
       "  'params_trans': [0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 1.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 't'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'ddm_seq2_angle_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 't', 'theta'],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.0, -0.1],\n",
       "   [2.5, 2.5, 2.5, 2.0, 2.0, 1.0]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'boundary_multiplicative': False,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 1.0, 0.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 't', 'theta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'ddm_seq2_weibull_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 't', 'alpha', 'beta'],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.0, 0.31, 0.31],\n",
       "   [2.5, 2.5, 2.5, 2.0, 2.0, 4.99, 6.99]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.5, 1.5],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.weibull_cdf(t=1, alpha=1, beta=1)>,\n",
       "  'boundary_multiplicative': True,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 1.0, 2.5, 3.5],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 't', 'alpha', 'beta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'alpha': 1.0,\n",
       "   'alpha_std': 0.5,\n",
       "   'beta': 1.0,\n",
       "   'beta_std': 0.5}},\n",
       " 'ddm_mic2_adj': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 'zh', 'zl1', 'zl2', 'd', 't'],\n",
       "  'params_trans': [0, 0, 0, 0, 1, 1, 1, 1, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, None, None, None, None, 1.0],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.2, 0.2, 0.2, 0.0, 0.0],\n",
       "   [2.5, 2.5, 2.5, 2.0, 0.8, 0.8, 0.8, 1.0, 2.0]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 0.5, 0.5, 0.5, 0.5, 0.5],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 'zh', 'zl1', 'zl2', 'd', 't'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'zh': 0.1,\n",
       "   'zh_trans': 0.2,\n",
       "   'zl1': 0.1,\n",
       "   'zl1_trans': 0.2,\n",
       "   'zl2': 0.1,\n",
       "   'zl2_trans': 0.2,\n",
       "   'd': 0.1,\n",
       "   'd_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'ddm_mic2_adj_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 'd', 't'],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.0, 0.0],\n",
       "   [2.5, 2.5, 2.5, 2.0, 1.0, 2.0]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 0.5, 1.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 'd', 't'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'd': 0.1,\n",
       "   'd_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'ddm_mic2_adj_angle_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 'd', 't', 'theta'],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.0, 0.0, -0.1],\n",
       "   [2.5, 2.5, 2.5, 2.0, 1.0, 2.0, 1.0]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'boundary_multiplicative': False,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 0.5, 1.0, 0.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 'd', 't', 'theta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'd': 0.1,\n",
       "   'd_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'ddm_mic2_adj_weibull_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 'd', 't', 'alpha', 'beta'],\n",
       "  'param_bounds': [[-2.5, -2.5, -2.5, 0.3, 0.0, 0.0, 0.31, 0.31],\n",
       "   [2.5, 2.5, 2.5, 2.0, 1.0, 2.0, 4.99, 6.99]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.0, 1.5, 1.5],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.weibull_cdf(t=1, alpha=1, beta=1)>,\n",
       "  'boundary_multiplicative': True,\n",
       "  'params_default': [0.0, 0.0, 0.0, 1.0, 0.5, 1.0, 2.5, 3.5],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 'd', 't', 'alpha', 'beta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'd': 0.1,\n",
       "   'd_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'alpha': 1.0,\n",
       "   'alpha_std': 0.5,\n",
       "   'beta': 1.0,\n",
       "   'beta_std': 0.5}},\n",
       " 'tradeoff_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 'd', 't'],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0],\n",
       "  'param_bounds': [[-4.0, -4.0, -4.0, 0.3, 0.0, 0.0],\n",
       "   [4.0, 4.0, 4.0, 2.5, 1.0, 2.0]],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'n_params': 6,\n",
       "  'default_params': [0.0, 0.0, 0.0, 1.0, 0.5, 1.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 'd', 't'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 0.1,\n",
       "   'd': 0.1,\n",
       "   'd_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'tradeoff_angle_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 'd', 't', 'theta'],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0, 0],\n",
       "  'param_bounds': [[-4.0, -4.0, -4.0, 0.3, 0.0, 0.0, -0.1],\n",
       "   [4.0, 4.0, 4.0, 2.5, 1.0, 2.0, 1.0]],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'boundary_multiplicative': False,\n",
       "  'n_params': 7,\n",
       "  'default_params': [0.0, 0.0, 0.0, 1.0, 0.5, 1.0, 0.0],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 'd', 't', 'theta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 0.1,\n",
       "   'd': 0.1,\n",
       "   'd_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'tradeoff_weibull_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh', 'vl1', 'vl2', 'a', 'd', 't', 'alpha', 'beta'],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0, 0, 0],\n",
       "  'param_bounds': [[-4.0, -4.0, -4.0, 0.3, 0.0, 0.0, 0.31, 0.31],\n",
       "   [4.0, 4.0, 4.0, 2.5, 1.0, 2.0, 4.99, 6.99]],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.weibull_cdf(t=1, alpha=1, beta=1)>,\n",
       "  'boundary_multiplicative': True,\n",
       "  'n_params': 8,\n",
       "  'default_params': [0.0, 0.0, 0.0, 1.0, 0.5, 1.0, 2.5, 3.5],\n",
       "  'hddm_include': ['vh', 'vl1', 'vl2', 'a', 'd', 't', 'alpha', 'beta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 0.1,\n",
       "   'd': 0.1,\n",
       "   'd_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'alpha': 1.0,\n",
       "   'alpha_std': 0.5,\n",
       "   'beta': 1.0,\n",
       "   'beta_std': 0.5}},\n",
       " 'tradeoff_conflict_gamma_no_bias': {'doc': 'Currently undocumented, in testing phase.',\n",
       "  'params': ['vh',\n",
       "   'vl1',\n",
       "   'vl2',\n",
       "   'd',\n",
       "   't',\n",
       "   'a',\n",
       "   'theta',\n",
       "   'scale',\n",
       "   'alphagamma',\n",
       "   'scalegamma'],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n",
       "  'param_bounds': [[-4.0, -4.0, -4.0, 0.0, 0.0, 0.3, 0.0, 0.0, 1.1, 0.5],\n",
       "   [4.0, 4.0, 4.0, 1.0, 2.0, 2.5, 0.5, 5.0, 5.0, 5.0]],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.conflict_gamma_bound(t=array([ 0. ,  0.1,  0.2,  0.3,  0.4,  0.5,  0.6,  0.7,  0.8,  0.9,  1. ,\n",
       "        1.1,  1.2,  1.3,  1.4,  1.5,  1.6,  1.7,  1.8,  1.9,  2. ,  2.1,\n",
       "        2.2,  2.3,  2.4,  2.5,  2.6,  2.7,  2.8,  2.9,  3. ,  3.1,  3.2,\n",
       "        3.3,  3.4,  3.5,  3.6,  3.7,  3.8,  3.9,  4. ,  4.1,  4.2,  4.3,\n",
       "        4.4,  4.5,  4.6,  4.7,  4.8,  4.9,  5. ,  5.1,  5.2,  5.3,  5.4,\n",
       "        5.5,  5.6,  5.7,  5.8,  5.9,  6. ,  6.1,  6.2,  6.3,  6.4,  6.5,\n",
       "        6.6,  6.7,  6.8,  6.9,  7. ,  7.1,  7.2,  7.3,  7.4,  7.5,  7.6,\n",
       "        7.7,  7.8,  7.9,  8. ,  8.1,  8.2,  8.3,  8.4,  8.5,  8.6,  8.7,\n",
       "        8.8,  8.9,  9. ,  9.1,  9.2,  9.3,  9.4,  9.5,  9.6,  9.7,  9.8,\n",
       "        9.9, 10. , 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9,\n",
       "       11. , 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9, 12. ,\n",
       "       12.1, 12.2, 12.3, 12.4, 12.5, 12.6, 12.7, 12.8, 12.9, 13. , 13.1,\n",
       "       13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 13.8, 13.9, 14. , 14.1, 14.2,\n",
       "       14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 14.9, 15. , 15.1, 15.2, 15.3,\n",
       "       15.4, 15.5, 15.6, 15.7, 15.8, 15.9, 16. , 16.1, 16.2, 16.3, 16.4,\n",
       "       16.5, 16.6, 16.7, 16.8, 16.9, 17. , 17.1, 17.2, 17.3, 17.4, 17.5,\n",
       "       17.6, 17.7, 17.8, 17.9, 18. , 18.1, 18.2, 18.3, 18.4, 18.5, 18.6,\n",
       "       18.7, 18.8, 18.9, 19. , 19.1, 19.2, 19.3, 19.4, 19.5, 19.6, 19.7,\n",
       "       19.8, 19.9]), a=0.5, theta=0.5, scale=1, alpha_gamma=1.01, scale_gamma=0.3)>,\n",
       "  'boundary_multiplicative': False,\n",
       "  'n_params': 10,\n",
       "  'default_params': [0.0, 0.0, 0.0, 0.5, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0],\n",
       "  'hddm_include': ['vh',\n",
       "   'vl1',\n",
       "   'vl2',\n",
       "   'a',\n",
       "   'd',\n",
       "   't',\n",
       "   'theta',\n",
       "   'scale',\n",
       "   'alphagamma',\n",
       "   'scalegamma'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'vh': 1.5,\n",
       "   'vh_std': 0.5,\n",
       "   'vl1': 1.5,\n",
       "   'vl1_std': 0.5,\n",
       "   'vl2': 1.5,\n",
       "   'vl2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 0.1,\n",
       "   'd': 0.1,\n",
       "   'd_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2,\n",
       "   'scale': 0.1,\n",
       "   'scale_std': 0.2,\n",
       "   'alphagamma': 0.1,\n",
       "   'alphagamma_std': 0.2,\n",
       "   'scalegamma': 0.1,\n",
       "   'scalegamma_std': 0.2}},\n",
       " 'race_no_bias_3': {'doc': 'To be used with the LAN extension. Note, we suggest to fix z instead here, since it is essentially \\nredundant with the boundary separation parameter a. Future versions will drop z altogether.',\n",
       "  'params': ['v0', 'v1', 'v2', 'a', 'z', 't'],\n",
       "  'params_trans': [0, 0, 0, 0, 1, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, None, 1.0],\n",
       "  'param_bounds': [[0.0, 0.0, 0.0, 1.0, 0.0, 0.0],\n",
       "   [2.5, 2.5, 2.5, 3.0, 0.9, 2.0]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 2.0, 0.5, 0.001],\n",
       "  'hddm_include': ['v0', 'v1', 'v2', 'a', 'z', 't'],\n",
       "  'choices': [0, 1, 2],\n",
       "  'slice_widths': {'v0': 1.5,\n",
       "   'v0_std': 0.5,\n",
       "   'v1': 1.5,\n",
       "   'v1_std': 0.5,\n",
       "   'v2': 1.5,\n",
       "   'v2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'race_no_bias_angle_3': {'doc': 'To be used with the LAN extension. Note, we suggest to fix z instead here, since it is essentially \\nredundant with the boundary separation parameter a. Future versions will drop z altogether.',\n",
       "  'params': ['v0', 'v1', 'v2', 'a', 'z', 't', 'theta'],\n",
       "  'param_bounds': [[0.0, 0.0, 0.0, 1.0, 0.0, 0.0, -0.1],\n",
       "   [2.5, 2.5, 2.5, 3.0, 0.9, 2.0, 1.45]],\n",
       "  'params_trans': [0, 0, 0, 0, 1, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, None, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 2.0, 0.5, 0.001, 0.0],\n",
       "  'hddm_include': ['v0', 'v1', 'v2', 'a', 'z', 't', 'theta'],\n",
       "  'choices': [0, 1, 2],\n",
       "  'slice_widths': {'v0': 1.5,\n",
       "   'v0_std': 0.5,\n",
       "   'v1': 1.5,\n",
       "   'v1_std': 0.5,\n",
       "   'v2': 1.5,\n",
       "   'v2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'race_no_bias_4': {'doc': 'To be used with the LAN extension. Note, we suggest to fix z instead here, since it is essentially \\nredundant with the boundary separation parameter a. Future versions will drop z altogether.',\n",
       "  'params': ['v0', 'v1', 'v2', 'v3', 'a', 'z', 't'],\n",
       "  'param_bounds': [[0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],\n",
       "   [2.5, 2.5, 2.5, 2.5, 3.0, 0.9, 2.0]],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.5, 1.0, None, 1.0],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 1, 0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 0.0, 2.0, 0.5, 0.001],\n",
       "  'hddm_include': ['v0', 'v1', 'v2', 'v3', 'a', 'z', 't'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'v0': 1.5,\n",
       "   'v0_std': 0.5,\n",
       "   'v1': 1.5,\n",
       "   'v1_std': 0.5,\n",
       "   'v2': 1.5,\n",
       "   'v2_std': 0.5,\n",
       "   'v3': 1.5,\n",
       "   'v3_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15}},\n",
       " 'race_no_bias_angle_4': {'doc': 'To be used with the LAN extension. Note, we suggest to fix z instead here, since it is essentially \\nredundant with the boundary separation parameter a. Future versions will drop z altogether.',\n",
       "  'params': ['v0', 'v1', 'v2', 'v3', 'a', 'z', 't', 'theta'],\n",
       "  'param_bounds': [[0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, -0.1],\n",
       "   [2.5, 2.5, 2.5, 2.5, 3.0, 0.9, 2.0, 1.45]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 1, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.5, 1.0, None, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 0.0, 2.0, 0.5, 0.001, 0.0],\n",
       "  'hddm_include': ['v0', 'v1', 'v2', 'v3', 'a', 'z', 't', 'theta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'v0': 1.5,\n",
       "   'v0_std': 0.5,\n",
       "   'v1': 1.5,\n",
       "   'v1_std': 0.5,\n",
       "   'v2': 1.5,\n",
       "   'v2_std': 0.5,\n",
       "   'v3': 1.5,\n",
       "   'v3_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'lca_no_bias_3': {'doc': 'To be used with the LAN extension. Note, we suggest to fix z instead here, since it is essentially \\nredundant with the boundary separation parameter a. Future versions will drop z altogether.',\n",
       "  'params': ['v0', 'v1', 'v2', 'a', 'z', 'g', 'b', 't'],\n",
       "  'param_bounds': [[0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -1.0, 0.0],\n",
       "   [2.5, 2.5, 2.5, 3.0, 0.9, 1.0, 1.0, 2.0]],\n",
       "  'params_trans': [0, 0, 0, 0, 1, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, None, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 2.0, 0.5, 0.0, 0.0, 0.001],\n",
       "  'hddm_include': ['v0', 'v1', 'v2', 'a', 'z', 'g', 'b', 't'],\n",
       "  'choices': [0, 1, 2],\n",
       "  'slice_widths': {'v0': 1.5,\n",
       "   'v0_std': 0.5,\n",
       "   'v1': 1.5,\n",
       "   'v1_std': 0.5,\n",
       "   'v2': 1.5,\n",
       "   'v2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'g': 0.1,\n",
       "   'g_std': 0.2,\n",
       "   'b': 0.1,\n",
       "   'b_std': 0.2}},\n",
       " 'lca_no_bias_angle_3': {'doc': 'To be used with the LAN extension. Note, we suggest to fix z instead here, since it is essentially \\nredundant with the boundary separation parameter a. Future versions will drop z altogether.',\n",
       "  'params': ['v0', 'v1', 'v2', 'a', 'z', 'g', 'b', 't', 'theta'],\n",
       "  'param_bounds': [[0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -1.0, 0.0, -1.0],\n",
       "   [2.5, 2.5, 2.5, 3.0, 0.9, 1.0, 1.0, 2.0, 1.45]],\n",
       "  'params_trans': [0, 0, 0, 0, 1, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.0, None, 1.5, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 2.0, 0.5, 0.0, 0.0, 0.001, 0.0],\n",
       "  'hddm_include': ['v0', 'v1', 'v2', 'a', 'z', 'g', 'b', 't', 'theta'],\n",
       "  'choices': [0, 1, 2],\n",
       "  'slice_widths': {'v0': 1.5,\n",
       "   'v0_std': 0.5,\n",
       "   'v1': 1.5,\n",
       "   'v1_std': 0.5,\n",
       "   'v2': 1.5,\n",
       "   'v2_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'g': 0.1,\n",
       "   'g_std': 0.2,\n",
       "   'b': 0.1,\n",
       "   'b_std': 0.2,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'lca_no_bias_4': {'doc': 'To be used with the LAN extension. Note, we suggest to fix z instead here, since it is essentially \\nredundant with the boundary separation parameter a. Future versions will drop z altogether.',\n",
       "  'params': ['v0', 'v1', 'v2', 'v3', 'a', 'z', 'g', 'b', 't'],\n",
       "  'param_bounds': [[0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -1.0, 0.0],\n",
       "   [2.5, 2.5, 2.5, 2.5, 3.0, 0.9, 1.0, 1.0, 2.0]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 1, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.5, 1.0, None, 1.5, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 0.0, 2.0, 0.5, 0.0, 0.0, 0.001],\n",
       "  'hddm_include': ['v0', 'v1', 'v2', 'v3', 'a', 'z', 'g', 'b', 't'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'v0': 1.5,\n",
       "   'v0_std': 0.5,\n",
       "   'v1': 1.5,\n",
       "   'v1_std': 0.5,\n",
       "   'v2': 1.5,\n",
       "   'v2_std': 0.5,\n",
       "   'v3': 1.5,\n",
       "   'v3_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'g': 0.1,\n",
       "   'g_std': 0.2,\n",
       "   'b': 0.1,\n",
       "   'b_std': 0.2}},\n",
       " 'lca_no_bias_angle_4': {'doc': 'To be used with the LAN extension. Note, we suggest to fix z instead here, since it is essentially \\nredundant with the boundary separation parameter a. Future versions will drop z altogether.',\n",
       "  'params': ['v0', 'v1', 'v2', 'v3', 'a', 'z', 'g', 'b', 't', 'theta'],\n",
       "  'param_bounds': [[0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -1.0, 0.0, -0.1],\n",
       "   [2.5, 2.5, 2.5, 2.5, 3.0, 0.9, 1.0, 1.0, 2.0, 1.45]],\n",
       "  'params_trans': [0, 0, 0, 0, 0, 1, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.5, 1.5, 1.5, 1.0, None, 1.5, 1.0, 1.0, 1.0],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.angle(t=1, theta=1)>,\n",
       "  'params_default': [0.0, 0.0, 0.0, 0.0, 2.0, 0.5, 0.0, 0.0, 0.001, 0.0],\n",
       "  'hddm_include': ['v0', 'v1', 'v2', 'v3', 'a', 'z', 'g', 'b', 't', 'theta'],\n",
       "  'choices': [0, 1, 2, 3],\n",
       "  'slice_widths': {'v0': 1.5,\n",
       "   'v0_std': 0.5,\n",
       "   'v1': 1.5,\n",
       "   'v1_std': 0.5,\n",
       "   'v2': 1.5,\n",
       "   'v2_std': 0.5,\n",
       "   'v3': 1.5,\n",
       "   'v3_std': 0.5,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'g': 0.1,\n",
       "   'g_std': 0.2,\n",
       "   'b': 0.1,\n",
       "   'b_std': 0.2,\n",
       "   'theta': 0.1,\n",
       "   'theta_std': 0.2}},\n",
       " 'full_ddm2': {'doc': 'Currently unavailable, for LANs after switch to pytorch. \\nComing soon... Please use standard HDDM if you want to fit this model to your data.',\n",
       "  'params': ['v', 'a', 'z', 't', 'sz', 'sv', 'st'],\n",
       "  'params_trans': [0, 0, 1, 0, 0, 0, 0],\n",
       "  'params_std_upper': [1.5, 1.0, None, 1.0, 0.1, 0.5, 0.1],\n",
       "  'param_bounds': [[-3.0, 0.3, 0.3, 0.25, 0.001, 0.001, 0.001],\n",
       "   [3.0, 2.5, 0.7, 2.25, 0.2, 2.0, 0.25]],\n",
       "  'boundary': <function ssms.basic_simulators.boundary_functions.constant(t=0)>,\n",
       "  'params_default': [0.0, 1.0, 0.5, 0.25, 0.001, 0.001, 0.001],\n",
       "  'hddm_include': ['v', 'a', 't', 'z', 'st', 'sv', 'sz'],\n",
       "  'choices': [-1, 1],\n",
       "  'slice_widths': {'v': 1.5,\n",
       "   'v_std': 1,\n",
       "   'a': 1,\n",
       "   'a_std': 1,\n",
       "   'z': 0.1,\n",
       "   'z_trans': 0.2,\n",
       "   't': 0.01,\n",
       "   't_std': 0.15,\n",
       "   'sz': 1.1,\n",
       "   'st': 0.1,\n",
       "   'sv': 0.5}}}"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hddm.model_config.model_config"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Using default priors: Uninformative\n",
      "Supplied model_config specifies params_std_upper for  z as  None.\n",
      "Changed to 10\n"
     ]
    }
   ],
   "source": [
    "model_angle_no_theta = hddm.HDDMnn(\n",
    "    data_angle, model=\"angle\", include=[\"v\", \"a\", \"t\", \"z\"]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " [-----------------100%-----------------] 1000 of 1000 complete in 47.4 sec"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<pymc.MCMC.MCMC at 0x7ff30160bed0>"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_angle_no_theta.sample(1000, burn=500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>2.5q</th>\n",
       "      <th>25q</th>\n",
       "      <th>50q</th>\n",
       "      <th>75q</th>\n",
       "      <th>97.5q</th>\n",
       "      <th>mc err</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>v</th>\n",
       "      <td>1.124278</td>\n",
       "      <td>0.09761</td>\n",
       "      <td>0.928012</td>\n",
       "      <td>1.052883</td>\n",
       "      <td>1.128692</td>\n",
       "      <td>1.191886</td>\n",
       "      <td>1.310813</td>\n",
       "      <td>0.008418</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>1.363875</td>\n",
       "      <td>0.053492</td>\n",
       "      <td>1.259736</td>\n",
       "      <td>1.327325</td>\n",
       "      <td>1.364278</td>\n",
       "      <td>1.396537</td>\n",
       "      <td>1.468327</td>\n",
       "      <td>0.004211</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>z</th>\n",
       "      <td>0.49972</td>\n",
       "      <td>0.030672</td>\n",
       "      <td>0.436555</td>\n",
       "      <td>0.477589</td>\n",
       "      <td>0.498887</td>\n",
       "      <td>0.522161</td>\n",
       "      <td>0.558534</td>\n",
       "      <td>0.002693</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>t</th>\n",
       "      <td>0.536048</td>\n",
       "      <td>0.033127</td>\n",
       "      <td>0.464361</td>\n",
       "      <td>0.515404</td>\n",
       "      <td>0.53657</td>\n",
       "      <td>0.558055</td>\n",
       "      <td>0.595229</td>\n",
       "      <td>0.002959</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       mean       std      2.5q       25q       50q       75q     97.5q  \\\n",
       "v  1.124278   0.09761  0.928012  1.052883  1.128692  1.191886  1.310813   \n",
       "a  1.363875  0.053492  1.259736  1.327325  1.364278  1.396537  1.468327   \n",
       "z   0.49972  0.030672  0.436555  0.477589  0.498887  0.522161  0.558534   \n",
       "t  0.536048  0.033127  0.464361  0.515404   0.53657  0.558055  0.595229   \n",
       "\n",
       "     mc err  \n",
       "v  0.008418  \n",
       "a  0.004211  \n",
       "z  0.002693  \n",
       "t  0.002959  "
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_angle_no_theta.gen_stats()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Again we observe how the parameter estimates are affected by the *wrong choice of `theta`. The model tries to compensate for the parallel bounds (no collapse), implied by the `theta` default, by decreasing `a` and slightly increasing `v`. Let's now try again, but this time we set `theta` fixed to the actual *ground truth*."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Using default priors: Uninformative\n",
      "Supplied model_config specifies params_std_upper for  z as  None.\n",
      "Changed to 10\n"
     ]
    }
   ],
   "source": [
    "# copy out the model_config dictionary for the angle model\n",
    "my_model_config_angle = deepcopy(hddm.model_config.model_config[\"angle\"])\n",
    "# set theta default to the ground truth defined above\n",
    "my_model_config_angle[\"params_default\"][4] = 0.2\n",
    "\n",
    "model_angle_no_theta_2 = hddm.HDDMnn(\n",
    "    data_angle,\n",
    "    model=\"angle\",\n",
    "    include=[\"v\", \"a\", \"t\", \"z\"],\n",
    "    model_config=my_model_config_angle,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " [-----------------100%-----------------] 1000 of 1000 complete in 53.4 sec"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<pymc.MCMC.MCMC at 0x7ff301652c90>"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_angle_no_theta_2.sample(1000, burn=500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>2.5q</th>\n",
       "      <th>25q</th>\n",
       "      <th>50q</th>\n",
       "      <th>75q</th>\n",
       "      <th>97.5q</th>\n",
       "      <th>mc err</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>v</th>\n",
       "      <td>1.020949</td>\n",
       "      <td>0.089617</td>\n",
       "      <td>0.838443</td>\n",
       "      <td>0.959232</td>\n",
       "      <td>1.019338</td>\n",
       "      <td>1.087935</td>\n",
       "      <td>1.188067</td>\n",
       "      <td>0.007229</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>a</th>\n",
       "      <td>1.46397</td>\n",
       "      <td>0.049143</td>\n",
       "      <td>1.363087</td>\n",
       "      <td>1.429878</td>\n",
       "      <td>1.465694</td>\n",
       "      <td>1.49972</td>\n",
       "      <td>1.554566</td>\n",
       "      <td>0.003623</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>z</th>\n",
       "      <td>0.527111</td>\n",
       "      <td>0.027281</td>\n",
       "      <td>0.471521</td>\n",
       "      <td>0.508124</td>\n",
       "      <td>0.527366</td>\n",
       "      <td>0.547015</td>\n",
       "      <td>0.581392</td>\n",
       "      <td>0.002391</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>t</th>\n",
       "      <td>0.528561</td>\n",
       "      <td>0.029786</td>\n",
       "      <td>0.470851</td>\n",
       "      <td>0.50755</td>\n",
       "      <td>0.527586</td>\n",
       "      <td>0.547936</td>\n",
       "      <td>0.588767</td>\n",
       "      <td>0.002522</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       mean       std      2.5q       25q       50q       75q     97.5q  \\\n",
       "v  1.020949  0.089617  0.838443  0.959232  1.019338  1.087935  1.188067   \n",
       "a   1.46397  0.049143  1.363087  1.429878  1.465694   1.49972  1.554566   \n",
       "z  0.527111  0.027281  0.471521  0.508124  0.527366  0.547015  0.581392   \n",
       "t  0.528561  0.029786  0.470851   0.50755  0.527586  0.547936  0.588767   \n",
       "\n",
       "     mc err  \n",
       "v  0.007229  \n",
       "a  0.003623  \n",
       "z  0.002391  \n",
       "t  0.002522  "
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_angle_no_theta_2.gen_stats()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As we see, fixing `theta` to the actual ground truth, corrects the parameter estimates of the remaining parameters to be much more accurate again."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### Let's compare DICs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Standard:  1059.453694824219\n",
      "theta set to model_config default:  1066.945202636719\n",
      "theta set to ground truth:  1058.248090332031\n"
     ]
    }
   ],
   "source": [
    "print(\"Standard: \", model_angle.dic)\n",
    "print(\"theta set to model_config default: \", model_angle_no_theta.dic)\n",
    "print(\"theta set to ground truth: \", model_angle_no_theta_2.dic)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We observe in this case, that fixing `theta` to `0` instead of `0.2`, didn't do too much damage as far as the DICs are concerned. Nevertheless, the *explicitly wrong* model performs worst as per this metric. "
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### END\n",
    "\n",
    "Hopefully this was helpful."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.1 (main, Jan  6 2023, 16:11:36) [Clang 11.0.0 (clang-1100.0.33.16)]"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "1a1af0ee75eeea9e2e1ee996c87e7a2b11a0bebd85af04bb136d915cefc0abce"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
